#include <iostream>
#include <vector>

using namespace std;

class Solution
{
public:
    int maxSubArray(vector<int> &nums)
    {
        int currentMax = -10000;
        int globalMax = -10000;
        for (int num : nums)
        {
            currentMax = max(currentMax + num, num);
            globalMax = max(globalMax, currentMax);
        }
        return globalMax;
    }
};

int main()
{
    cout << "Code53" << endl;
    Solution s;
    return 0;
}